EMT Practice Test

1. Question Content...


Question List

Question1: What is the advantage of Salesforce Lightning?

Question2: A developer needs to create records for the object Property__c. The developer creates the following code block:List propertiesToCreate = helperClass.createProperties();try { // line 3 } catch (Exception exp ) {
//exception
handling }Which line of code would the developer insert at line 3 to ensure that at least some records are created, even if a few records have errors and fail to be created?

Question3: What are two considerations for custom Apex Exception classes? Choose 2 answers.

Question4: A developer has a unit test that is failing. To identify the issue, the developer copies the code inside the test method and executes it via the Execute Anonymous Apex Tool. The code then executes without failing. Why did the unit test failed, but not the Execute Anonymous?

Question5: How can a developer avoid exceeding governor limits when using an Apex Trigger?choose 2 answers

Question6: What is a characteristic of the Lightning Component Framework? Choose 2 answers:

Question7: Which option would a developer use to display the Accounts created in the current week and the number of related Contacts using a debug statement in Apex?

Question8: A user selects a value from a multi-select picklist. How is this selected value represented in Apex?

Question9: A reviewer is required to enter a reason in the comments field only when a candidate is recommended to be hired. Which action can a developer take to enforce this requirement?

Question10: Where would a developer build a managed package?

Question11: A candidate may apply to multiple jobs at the company Universal Containers by submitting a single application per job posting, that application cannot be modified to be resubmitted to a different job posting.What can the administrator do to associate an application with each job posting in the schema for the organization?

Question12: What must the Controller for a Visulforce page utilized to override the standard Opportunity view button?

Question13: What is the result of the following code block ?
Integer x = 1;Integer Y = 0;While(x < 10){Y++;}

Question14: What declarative method helps ensure quality data? Choose 3 answers

Question15: What is a valid way of loading external JavaScript files into a Visualforce page? (Choose 2)

Question16: What is a capability of a StandardSetController?Choose 2 answers

Question17: Which resource can be included in a Lightning Component bundle? Choose 2 answers

Question18: Universal Containers requires Service Representatives to update all Cases at least one every three days. To make sure of this policy is obeyed, a developer has been asked to implement a field that displays the number of days since the last Case update. What should the developer use to configure the solution?

Question19: A method is passed a list of generic sObjects as a parameter.
What should the developer do to determine which object type (Account, Lead, or Contact, for example) to cast each sObject?

Question20: How can a developer retrieve all Opportunity record type labels to populate a list collection?Choose 2 answers

Question21: How would a developer determine if a CustomObject__c record has been manually shared with the current user in Apex?

Question22: A Visual force page displays two fields named Phone Number and Email.User1 has access to Phone Number, but not to Email.User2 has access to Email, but not Phone NumberA developer needs to ensure that User1 can only see Phone Number, and User2 can only see Email.Which method can the developer use to achieve this?

Question23: Which type of code represents the Controller in MVC architecture on the Force.com platform? (Choose 2)

Question24: A developer wants to override a button using Visualforce on an object.
What is the requirement?

Question25: What is a valid source and destination pair that can send or receive change sets? (Choose 2)

Question26: A developer creates a custom controller and custom Visualforce page by using the following code block:public class myController {public String myString;public String getMyString() {return 'getmyString';}public String getStringMethod1() {return myString;}public String getStringMethod2() {if (myString == null)myString =
'Method2';return myString;}}{!myString}, {!StringMethod1}, {!StringMethod2}, {!myString}What does the user see when accessing the custom page?

Question27: In which order does SalesForce execute events upon saving a record?

Question28: Which tool allows a developer to send requests to the Salesforce REST APIs and view the responses?

Question29: A developer has the following code:try {List nameList;Account a;String s = a.Name;nameList.add(s);} catch (ListException le ) {System.debug(' List Exception ');} catch (NullPointerException npe) {System.debug(' NullPointer Exception ');} catch (Exception e) {System.debug(' Generic Exception ');} What message will be logged?

Question30: What are two valid options for iterating through each Account in the collection List <Account> named AccountList? Choose 2 answers.

Question31: A developer needs to know if all tests currently pass in a Salesforce environment. Which feature can the developer use? (Choose 2)

Question32: What is a benefit of using an after insert trigger over using a before insert trigger?

Question33: Using the Schema Builder, a developer tries to change the API name of a field that is referenced in an Apex test class.
What is the end result?

Question34: What should a developer use to implement an automate approval process submission for case?

Question35: A developer created a Lightning component to display a short text summary for an object and wants to use it with multiple Apex classes.
How should the developer design the Apex classes?

Question36: Which requirement needs to be implemented by using standard workflow instead of Process Builder? Choose
2 answers

Question37: A developer creates a new Visualforce page and Apex extension, and writes test classes that exercise 95% coverage of the new Apex extension.Change set deployment to production fails with the test coverage warning: "Average test coverage across all Apex classes and triggers is 74%, at least 75% test coverage is required."What can the developer do to successfully deploy the new Visualforce page and extension?

Question38: A company has a custom object named Warehouse. Each Warehouse record has a distinct record owner, and is related to a parent Account in Salesforce.Which kind of relationship would a developer use to relate the Account to the Warehouse?

Question39: A developer is asked to set a picklist field to 'Monitor' on any new Leads owned by a subnet of Users.
How should the developer implement this request?

Question40: When creating unit tests in Apex, which statement is accurate?Choose 2

Question41: When the value of a field of an account record is updated, which method will update the value of a custom field opportunity? Choose 2 answers.

Question42: The sales management team requires that the lead source field of the Lead record be populated when Lead is converted. What would a developer use to ensure that a user populates the Lead source field?

Question43: A developer has created a Visualforce Page and Apex Controller that uses the With Sharing keyword. The page will be used of by Sales Managers and should only display Accounts owned by Sales Representatives who report to the running Sales Manager. The organization-wide sharing for Accounts is set to Private. Which additional set of stops should the developer take?

Question44: When would a developer use a custom controller instead of a controller extension? Choose 2 answers:

Question45: What is a capability of the Force.com IDE? Choose 2 answers

Question46: When can a developer use a custom Visualforce page in a Force.com application? (Choose 2)

Question47: A Platform Developer needs to write an Apex method that will only perform an action if a record is assigned to a specific Record Type.
Which two options allow the developer to dynamically determine the ID of the required Record Type by its name? (Choose two.)

Question48: What is accurate statement about with sharing keyword? Choose 2 answers

Question49: A developer needs to write a method that searches for a phone number that could be on multiple object types.
Which method should the developer use to accomplish this task?

Question50: Which statement about change set deployments is accurate? (Choose 3)

Question51: Which two are true regarding a Dyno? Choose 2 answers

Question52: In a single record, a user selects multiple values from a multi-select picklist. How are the selected values represented in Apex?

Question53: To which primitive data type in Apex is a currency field atomically assigned?

Question54: Which two strategies should a developer use to avoid hitting governor limits when developing in a multi-tenant environment? (Choose two.)

Question55: A developer has a single custom controller class that works with a Visualforce Wizard to support creating and editing multiple sObjects. The wizard accepts data from user inputs across multiple Visualforce pages and from a parameter on the initial URLWhich statement is unnecessary inside the unit test for the custom controller?

Question56: A developer wants to display all of the available record types for a Case object. The developer also wants to display the picklist values for the Case.Status field. The Case object and the Case.Status field are on a custom Visualforce page. Which action can the developer perform to get the record types and picklist values in the controller? (Choose 2)

Question57: Which three tools can deploy metadata to production? (Choose three.)

Question58: Given the code block: Integer x; For(x=0;x<10; x+=2) { If(x==8) break; If(x==10) break; } System.debug(x); Which value will the system debug statement display?

Question59: Which two platform features align to the Controller portion of MVC architecture? (Choose two.)

Question60: A company wants a recruiting app that models candidates and interviews; displays the total number of interviews on each candidate record; and defines security on interview records that is independent from the security on candidate records. What would a developer do to accomplish this task? Choose 2 answers

Question61: In an organization that has enabled multiple currencies, a developer needs to aggregate the sum of the Estimated_value__c currency field from the CampaignMember object using a roll-up summary field called Total_estimated_value__c on Campaign.

Question62: Which statement results in an Apex compiler error?

Question63: A developer wants to list all of the Tasks for each Account on the Account detail page. When a task is created for a Contact, what does the developer need to do to display the Task on the related Account record?

Question64: An org has different Apex Classes that provide Account -related functionality.After a new validation rule is added to the object, many of the test methods fail.What can be done to resolve the failures and reduce the number of code changes needed for future validation rules?Choose 2 answers:

Question65: A company that uses a Custom object to track candidates would like to send candidate information automatically to a third -party human resource system when a candidate is hired. What can a developer do to accomplish this task?

Question66: Which two platform features allow for the use of unsupported languages? Choose 2 answers

Question67: What must the Controller for a Visualforce page utilize to override the Standard Opportunity view button?

Question68: The Review_c object have a lookup relationship to the job_Application_c object. The job_Application_c object has a master detail relationship up to the position_c object. The relationship is based on the auto populated defaults?
What is the recommended way to display field data from the related Review _C records a Visualforce page for a single Position_c record? Select one of the following:

Question69: What are two testing consideration when deploying code from a sandbox to production? Choose 2 answers

Question70: What is a capability of the <ltng:require> tag that is used for loading external Javascript libraries in Lightning Component? (Choose three.)

Question71: A developer executes the following code in the Developer Console:
List<Account> fList = new List <Account> ();For(integer i= 1; I <= 200; i++){fList.add(new Account ( Name
= 'Universal Account ' + i));}Insert fList;List <Account> sList = new List<Account>();For (integer I = 201; I
<=
20000; i ++){sList.add(new Account (Name = 'Universal Account ' + i));}Insert sList;How many accounts are created in the Salesforce organization ?

Question72: A developer needs to create a Visualforce page that will override the standard Account edit button. The page will be used to validate the account's address using a SOQL query. The page will also allow the user to make edits to the address. Where would the developer write the Account address verification logic?

Question73: Which tool can deploy destructive changes to Apex classes in production?

Question74: What is a valid Apex statement?

Question75: Which scenario is invalid for execution by unit tests?

Question76: A developer needs to display all of the available fields for an object.
In which two ways can the developer retrieve the available fields if the variable myObject represents the name of the object? (Choose two.)

Question77: Which user can edit a record after it has been locked for approval? (Choose 2)

Question78: What should a developer use to implement an automatic Approval Process submission for Cases?

Question79: A developer writes the following code:

What is the result of the debug statement?

Question80: What is true for a partial sandbox that is not true for a full sandbox? Choose 2 answers:

Question81: What would a developer do to update a picklist field on related Opportunity records when a modification to the associated Account record is detected?

Question82: What is a benefit of the Lightning Component framework?Choose 3 answers

Question83: How should a developer create a new custom exception class?

Question84: Which code segment can be used to control when the dowork() method is called?

Question85: A developer needs to confirm that an Account trigger is working correctly without changing the organization's data.What would the developer do to test the Account trigger?

Question86: What is true of a partial sandbox that is not true of a full sandbox? Choose 2 answers